<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@ taglib uri="/WEB-INF/FCKeditor.tld" prefix="fck" %>
<%@page import="java.util.*,model.*,util.*,control.*"%>
<!DOCTYPE html>
<html>
<head>
    <title>自适应测评系统</title>
    <meta charset="utf-8"/>
    <script  src='../../js/core.js'></script>
    <link type="text/css" rel='stylesheet' href="../../css/common.css"/>
    <link type="text/css" rel='stylesheet' href="../../css/houtai.css"/>
</head>
<body>
            <%
           /***********************************************************************************/
           /*
           *验证权限
           *author 胡瑾
           *data 2011-12-08
           */
			String flag = (String)session.getAttribute("flag");
			String userId = (String)session.getAttribute("userId");
			int adminId = Integer.parseInt(userId);
						
			if (flag != "admin"|| flag == null )
			{
				out.print("<p>您没有管理员权限</p>");
				out.print("<a href=../index.jsp>重新登录</a>");
			}else{
				Admin admin = new Admin();
				AdminControl ac = new AdminControl();
				admin = ac.GetAdmin(adminId);
				//out.print("<p>"+admin.getName()+"   欢迎您</p>");
				
			}
			/*********************************************************************************/
           %>
          <%
	request.setCharacterEncoding("utf-8");
	int id = Integer.parseInt(request.getParameter("id"));
	
 
	Student student = new Student();
	StudentControl scc = new StudentControl();
	student = scc.GetStudent(id);

%>
<section class='init' style='margin-top:100px;'>
	<form method="post" name="form" action="student_updatechuli.jsp?id=<%=id%>&amp;oldUsername=<%=student.getUsername() %>"></p>
	        <p><label class='name'>用户名*</label><input class='inp' value="<%=student.getUsername() %>" type="text" name="userN"/></p>
	        <p><label class='name'>密码*</label><input class='inp' value="<%=student.getPassword() %>" type="text" name="pas"/></p>
	        <p><label class='name'>姓名 </label><input class='inp' value="<%=student.getStudentName() %>"  type="text" name="sna"/></p>
	   		<p><label class='name'>性别</label> <input class='inp' value="<%=student.getSex() %>" type="text" name="sx"/></p>
	  		<p><label class='name'>学校 </label><input class='inp' value="<%=student.getSchool() %>"  type="text" name="sc"/></p>
	 		<p><label class='name'>班级 </label><input class='inp' value="<%=student.getClasses() %>"  type="text" name="cl"/></p>
	 		<p><label class='name'>专业 </label><input class='inp' value="<%=student.getMajor() %>" type="text" name="ma"/></p>
		    <p style='margin-top:20px;'><input type="submit" class='br3 btns fl' value="确    定"> <input class='br3 btns fr' style='margin-right:20px;' type="reset" value="取   消"></p>
	</form>
</section>
      </body>
</html>
